﻿@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_JuiLayout.cshtml";

    Dictionary<string, object> dic_M = Model;

    string userName = selectControlBLL.getNameById("id", dic_M["UserId"].ToString(), "Sys_IBUsers", "RealName");

    string rturl = "/SysMenu/List?menu=SysIBUserFunctions&name=ListById&hostId=" + dic_M["UserId"];
}
@section header {}
<div id="layout" class="noNavTab">
    <div id="navTab">
        <h2 class="contentTitle">
            修改数据字典类别</h2>
        <div class="pageContent">
            <div class="pageFormContent nowrap" layouth="56">
                @{
                    int id = Utils.StrToInt(ViewData["id"], 0);

                    using (Html.BeginForm("Edit", "OperateTotal", new { id = id, dtnum = (int)Database.Default, name = DencryptHelper.Encrypt("Sys_IBUserFunctions"), url = rturl }, FormMethod.Post, new { @id = "subForm", @class = "pageForm required-validate", onsubmit = "return validateCallback(this,navTabAjaxDone)" }))
                    {
                        
                    <dl>
                        <dt>用户： </dt>
                        <dd>
                            @userName
                        </dd>
                    </dl>
                    <dl>
                        <dt>功能名称：</dt>
                        <dd>
                            <select name='t0_FunctionId' id='t0_FunctionId' class='required'>
                            @{Html.RenderPartial("~/Views/Shared/selectControl.ascx", SysMenu.getFunction("IsValid", "1"));}
                            </select>
                        </dd>
                    </dl>
                    <dl>
                        <dt>有权限：</dt>
                        <dd>
                            <label>
                                @Html.RadioButton("t0_HasRight", "true", Convert.ToBoolean(dic_M["HasRight"]))是</label>
                            <label>
                                @Html.RadioButton("t0_HasRight", "false", !Convert.ToBoolean(dic_M["HasRight"]))否</label>
                        </dd>
                    </dl>
                    <dl>
                        
                    </dl>
                   
                    <dl>
                        <dt>&nbsp</dt>
                        <dd>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="submit">
                                        修改</button></div>
                            </div>
                        </dd>
                        <dd>
                            <a class="button" href=@rturl><span>返回</span></a></dd>
                    </dl>
                        
                    }
                }
            </div>
        </div>
    </div>
</div>

<link href="../../content/jui-normal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(function () {
        $('#t0_FunctionId').change(function () {
            var v = $(this).val();
            if (v == "") {
                $('#p_level').html('');
            }
            else {
                $('#p_level').load('/SysMenu/Userlevel', { v: v }, function () {
                    if (isDWZInit) { initUI('#p_level'); }

                });
            }
        });
    });
</script>
